package com.zhang.mail.api;

import com.zhang.dubbo.api.email.EmailRpcApi;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/email")
public class MailApi {

    @Reference
    private EmailRpcApi emailService;

    @GetMapping("/sendSimple/{email}/{code}")
    public String sendSimple(@PathVariable("email") String email,
                             @PathVariable("code") String code){
        emailService.sendSimple(email,"VerCode",code);
        return "mail send success";
    }
}
